import 'package:flutter/material.dart';

///后台管理
class BackstagePage extends StatefulWidget{
  @override
  _backstageState createState()=>_backstageState();

}

class _backstageState extends State<BackstagePage>{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text('管理'),
      ),
      body: Container(
        child: ListView(
          children: <Widget>[
            _listTitle(title: '客户管理',iconData: Icons.people),
            _listTitle(title:'分组管理',iconData: Icons.assignment_ind),
            _listTitle(title: '设备管理',iconData: Icons.tune),
            _listTitle(title: '用户管理',iconData: Icons.contact_mail),
            _listTitle(title: '密码管理',iconData: Icons.lock_open),
          ],
        ),
      ),
    );
  }


  Widget _listTitle({String title,IconData iconData,GestureTapCallback callback}){
    return  Container(
      decoration: BoxDecoration(
          border: Border(
              bottom: BorderSide(
                  color: Colors.black12,
                  width: 0.5
              )
          )
      ),
      child: ListTile(
        title: Text(title),
        leading:Icon(iconData,color: Colors.blue,),
        trailing: Icon(Icons.navigate_next),
        onTap: callback,
      ),
    );
  }

}